package com.zhonghan.recharge.dao;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.zhonghan.recharge.pojo.ZhBusinessUser;
public interface ZhBusinessUserDao{
	/**
	 * 获得ZhBusinessUser数据的总行数
	 * @return
	 */
    long getZhBusinessUserRowCount();
	/**
	 * 获得ZhBusinessUser数据集合
	 * @return
	 */
    List<ZhBusinessUser> selectZhBusinessUser();
	/**
	 * 获得一个ZhBusinessUser对象,以参数ZhBusinessUser对象中不为空的属性作为条件进行查询
	 * @param obj
	 * @return
	 */
    List<ZhBusinessUser> selectZhBusinessUserByObj(ZhBusinessUser obj);
	/**
	 * 通过ZhBusinessUser的id获得ZhBusinessUser对象
	 * @param id
	 * @return
	 */
    ZhBusinessUser selectZhBusinessUserById(Long id);
	/**
	 * 插入ZhBusinessUser到数据库,包括null值
	 * @param value
	 * @return
	 */
    int insertZhBusinessUser(ZhBusinessUser value);
	/**
	 * 插入ZhBusinessUser中属性值不为null的数据到数据库
	 * @param value
	 * @return
	 */
    int insertNonEmptyZhBusinessUser(ZhBusinessUser value);
	/**
	 * 批量插入ZhBusinessUser到数据库,包括null值
	 * @param value
	 * @return
	 */
    int insertZhBusinessUserByBatch(List<ZhBusinessUser> value);
	/**
	 * 通过ZhBusinessUser的id删除ZhBusinessUser
	 * @param id
	 * @return
	 */
    int deleteZhBusinessUserById(Long id);
	/**
	 * 通过ZhBusinessUser的id更新ZhBusinessUser中的数据,包括null值
	 * @param enti
	 * @return
	 */
    int updateZhBusinessUserById(ZhBusinessUser enti);
	/**
	 * 通过ZhBusinessUser的id更新ZhBusinessUser中属性不为null的数据
	 * @param enti
	 * @return
	 */
    int updateNonEmptyZhBusinessUserById(ZhBusinessUser enti);
    
    /**
     * 修改余额
     * @param totalAssets
     * @param id
     * @return
     */
    int updateZhBusinessUserByTotalAssets(@Param("totalAssets") Long totalAssets,@Param("phone") String phone);
    
    /**
     * 更改账号总金额
     * @param enti
     * @return
     */
    int updateBusinessUserAssetsById(ZhBusinessUser enti);
    
    ZhBusinessUser selectZhBusinessUserByPhone(@Param("phone") String phone);
    /**
     * 修改大客户的端口信息
     * @param id
     * @param portToken
     * @param portAppkey
     * @param portAppsecret
     * @param portUrl
     * @param portPhone
     * @return
     */
    int updateBusinessUserByPort(@Param("id")Long id,@Param("portToken")String portToken,@Param("portAppkey")String portAppkey,
    		@Param("portAppsecret")String portAppsecret,@Param("portUrl")String portUrl,@Param("portPhone")String portPhone);
}